package com.android.gardensnake;


import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;

public class Launcher extends Activity{
        
        MediaPlayer ourSound;
        @Override
        protected void onCreate(Bundle savedInstanceStateKKK) {
                super.onCreate(savedInstanceStateKKK);
                setContentView(R.layout.launcher);
                ourSound = MediaPlayer.create(Launcher.this, R.raw.water2);
                ourSound.start();
                Thread timer = new Thread(){
                        public void run(){
                                try{ 
                                        sleep(5000);
                                        
                                }catch(InterruptedException e){
                                        e.printStackTrace();
                                }finally{
                                        Intent openStart = new Intent("com.android.gardensnake.MENU");
                                        startActivity(openStart);
                                }
                        }
                };
                timer.start();
        }//onCreate

        @Override
        protected void onPause() {
                
                super.onPause();
                ourSound.release();
                finish();
        }


        

}